<?php
class XConstants {
   public static $SUCCESS = 0;
   public static $ERROR = 1;
   public static $UNKNOWN = 2;
   public static $NOTFOUND = 3;

   /**
    * For login.
    */
   public static $LOGIN_SUCCESS = 1000;
   public static $LOGIN_FAILD = 1001;
   public static $LOGIN_FAILD_PWD = 1002;
   public static $LOGIN_FAILD_USER = 1003;

   /**
    * Operations
    */
   public static $OP_LOGIN = "login";
   public static $OP_CHECK_LOGIN = "checkLogin";
   public static $OP_GET_SNACKS = "getSnacks";
   public static $OP_UPDATE_SNACK = "updateSnack";
   public static $OP_ADD_NEWS = "addNews";
   public static $OP_GET_NEWS = "getNews";

   /**
    * To html
    */
   public static $RESPONSE_CODE = "code";

   /**
    * Form infos.
    */
   public static $FORM_USER_NAME = "username";
   public static $FORM_USER_PWD = "userpassword";
   public static $FORM_SNACK_OP = "opType";
   public static $FORM_SNACK_ID = "snackID";
   public static $FORM_SNACK_NAME = "snackName";
   public static $FORM_SNACK_TYPE = "snackType";
   public static $FORM_SNACK_PRICE = "snackPrice";
   public static $FORM_SNACK_DESC = "snackDesc";
   public static $FORM_SNACK_POINTS = "snackPoints";
   public static $FORM_NEWS_TITLE = "newsTitle";
   public static $FORM_NEWS_CONTENT = "newsContent";

   /**
    * Types.
    */
   public static $TYPE_OP_ADD = 0;
   public static $TYPE_OP_UPDATE = 1;
   public static $TYPE_OP_DELETE = 2;
}
?>